<template>
    <header>
        <span @click="back" class="back-icon">
        </span>
        <h3>{{ title }}</h3>
    </header>
</template>

<script>
export default {
    name: '',
    props: ["title"],
    data() {
        return {}
    },
    components: {},
    created() { },
    mounted() { },
    methods: {
        back() {

            // console.log(this.$router)
            // 返回上一个页面
            this.$router.back()
        }
    }
}
</script>
<style scoped lang='scss'>
header {
    height: 44px;
    line-height: 44px;
    position: relative;
    text-align: center;

    h3 {
        display: inline-block;
        vertical-align: middle;
        // background-color: aliceblue;

    }

    .back-icon {
        width: 28px;
        height: 28px;
        display: inline-block;
        background-image: url(../assets/images/back.png);
        vertical-align: middle;
        position: absolute;
        left: 16px;
        top: 8px;
    }
}
</style>
